SftTree/NET 2.0

IndexToPosition Method, ColumnsClass Class

Softel vdm, Inc.

Translates a real column index into the column display position.

Syntax      ColumnsClass Class (Softelvdm.SftTreeNET)

VB   

Public Function IndexToPosition( ByVal ColIndex As Integer ) As Integer

C#   

public int IndexToPosition( int ColIndex );

C++   

public: int IndexToPosition( int ColIndex );

ColIndex

The real column index.

Return Value

The column display position.

Comments

The IndexToPosition method translates a real column index into the column display position.

The real column index and the column display position are numbers in the range 0 through Count-1.

As a user reorders columns, this is completely transparent to the application. An application still references cells and columns by the "real" column index, which is the original column number that the cell or column had before columns were reordered by the user. While columns appear in a new order after dragging a column to a new position, the application references cells and columns by their real column number which never changes.

If a user reorders columns using column reordering, the column's display position, which is the column number as it appears to the user, may need to be translated into the real column number as used by an application.

The ColumnClass.Position property can be used to reorder columns under program control.


Feedback / comments / error reports for this topic
© 2007 - Softel vdm, Inc. - www.softelvdm.com